/**
 * 实训室耗材领用 api 封装
 *
 * @Author:    王俊权
 * @Date:      2024-11-08 13:31:03
 * @Copyright  🐂🐎bloc
 */
import { postRequest, getRequest } from '/@/lib/axios';

export const consumablesUsageApi = {

  /**
   * 分页查询  @author  王俊权
   */
  queryPage : (param) => {
    return postRequest('/consumablesUsage/queryPage', param);
  },

  /**
   * 增加  @author  王俊权
   */
  add: (param) => {
      return postRequest('/consumablesUsage/add', param);
  },

  /**
   * 修改  @author  王俊权
   */
  update: (param) => {
      return postRequest('/consumablesUsage/update', param);
  },


  /**
   * 删除  @author  王俊权
   */
  delete: (id) => {
      return getRequest(`/consumablesUsage/delete/${id}`);
  },

  /**
   * 批量删除  @author  王俊权
   */
  batchDelete: (idList) => {
      return postRequest('/consumablesUsage/batchDelete', idList);
  },

    /**
     * 审批 @author  lyy
     *
     */
    approval: (param) => {
        return postRequest('/consumablesUsage/approval', param);
    },
    /**
     * 查询物料 @author  lyy
     *
     *
     */
    getMaterial: (id) => {
        return getRequest(`/fabricMaterials/getFabricMaterial/${id}`);
    },

};
